package com.zenithmind.library.pojo.query;

import com.zenithmind.common.query.BaseQuery;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 图书分类查询条件
 *
 * @author ZenithMind
 * @since 2024-06-14
 */
@EqualsAndHashCode(callSuper = true)
@Data
@Schema(name = "图书分类查询条件", description = "图书分类查询的条件参数")
public class CategoryQuery extends BaseQuery {

    @Schema(description = "分类名称", example = "计算机")
    private String name;

    @Schema(description = "分类编码", example = "CS")
    private String code;

    @Schema(description = "父分类ID", example = "1")
    private String parentId;

    @Schema(description = "状态 (0-禁用, 1-启用)", example = "1")
    private Integer status;

    @Schema(description = "是否叶子节点 (0-否, 1-是)", example = "1")
    private Integer isLeaf;

    @Schema(description = "层级深度", example = "1")
    private Integer level;

    @Schema(description = "是否包含子分类", example = "true")
    private Boolean includeChildren;

    @Schema(description = "排序字段", example = "sortOrder")
    private String sortField;

    @Schema(description = "排序方向 (asc/desc)", example = "asc")
    private String sortOrder;
}
